Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make progress graph respect course settings #1194

Merged
merged 1 commit into from
Oct 11, 2023

Conversation

RafayGhafoor
Copy link
Contributor

@RafayGhafoor RafayGhafoor commented Sep 21, 2023

Closes #517

Description:

Currently, #517 faces an issue when the progress graph toggle is enabled/disabled but the settings are not respected, this PR requires merge of #33308 as a prerequisite so the disableProgressGraph attribute is available through course_metadata endpoint.

Testing Instructions:

  • Perform git pull on edx-platform repository followed by git checkout fix-progress-graph, it allows the backend to send disableProgressGraph attribute to our frontend-learning-app.

  • Login as edx user on studio.

  • Navigate to admin > waffle_utils > Waffle flag org overrides

  • Add and enable these flags:
    CleanShot 2023-09-21 at 17 25 43@2x

  • Navigate to Pages and Resources Tab in frontend-course-authoring app Demo Course page and toggle Enable Progress Graph to test the settings. Make sure you save the settings to reflect the changes.

CleanShot 2023-09-21 at 17 28 26@2x
  • Sign out on studio and login as normal user (honor) to perform the check.

  • Visit demo course progress tab to see if the progress graph is respecting the configuration.

Results:

Disabled Progress Graph:

  • Toggle Settings:

CleanShot 2023-09-21 at 17 37 54@2x
  • Result:

CleanShot 2023-09-21 at 17 39 23@2x

Enabled Progress Graph:

  • Toggle Settings:

CleanShot 2023-09-21 at 17 40 00@2x
  • Result:

CleanShot 2023-09-21 at 17 42 28@2x

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Sep 21, 2023
@openedx-webhooks
Copy link

openedx-webhooks commented Sep 21, 2023

Thanks for the pull request, @RafayGhafoor! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

Please let us know once your PR is ready for our review and all tests are green.

@RafayGhafoor
Copy link
Contributor Author

@Agrendalath, Please check when you have time. Thank you.

@Agrendalath
Copy link
Member

@RafayGhafoor, I believe @navinkarkera is the reviewer here.

@RafayGhafoor
Copy link
Contributor Author

Thank you, I will mention him here.

@navinkarkera, Please check when you time.

Copy link
Contributor

@navinkarkera navinkarkera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RafayGhafoor I have left some suggestions in edx-platform PR which will require some changes here as well.

@RafayGhafoor
Copy link
Contributor Author

@navinkarkera, I have made the changes.

Copy link
Contributor

@navinkarkera navinkarkera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 @RafayGhafoor

  • I tested this: (tested progress graph locally in devstack)
  • I read through the code
  • I checked for accessibility issues
  • Includes documentation
  • I made sure any change in configuration variables is reflected in the corresponding client's configuration-secure repository.

@RafayGhafoor RafayGhafoor changed the title fix: make progress graph respect course settings fix: make progress graph respect course settings. Sep 25, 2023
@RafayGhafoor RafayGhafoor changed the title fix: make progress graph respect course settings. fix: make progress graph respect course settings Sep 26, 2023
Copy link
Member

@farhaanbukhsh farhaanbukhsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

✅ I tested this on my devstack and it works cleanly.
✅ I read through the code
❌ I checked for accessibility issues
❌ Includes documentation
❌ I made sure any change in configuration variables is reflected in the corresponding client's configuration-secure repository.

@itsjeyd itsjeyd added the needs test run Author's first PR to this repository, awaiting test authorization from Axim label Oct 10, 2023
@itsjeyd
Copy link

itsjeyd commented Oct 10, 2023

@RafayGhafoor Thank you for this contribution!

@Agrendalath @farhaanbukhsh Once tests are green, will we need another review from the Aurora team to be able to merge these changes, or are your approvals binding?

@Agrendalath
Copy link
Member

@itsjeyd, it's a bug fix, so I suppose that we could ask the CCs of the frontend repos to merge this.

@navinkarkera
Copy link
Contributor

navinkarkera commented Oct 11, 2023

@brian-smith-tcril Could you please help us triggering the tests as well as review and merge this?

@codecov
Copy link

codecov bot commented Oct 11, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (168ed1e) 87.87% compared to head (c064e07) 87.91%.
Report is 5 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1194      +/-   ##
==========================================
+ Coverage   87.87%   87.91%   +0.04%     
==========================================
  Files         263      263              
  Lines        4485     4486       +1     
  Branches     1133     1134       +1     
==========================================
+ Hits         3941     3944       +3     
+ Misses        530      528       -2     
  Partials       14       14              
Files Coverage Δ
src/course-home/progress-tab/ProgressTab.jsx 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@brian-smith-tcril brian-smith-tcril left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense!

Once https://github.com/openedx/edx-platform/pull/33308/files lands, we will be getting back a boolean value for disable_progress_graph from the progress endpoint.

This MFE will grab that as a part of getProgressTabData

export async function getProgressTabData(courseId, targetUserId) {
let url = `${getConfig().LMS_BASE_URL}/api/course_home/progress/${courseId}`;

It will be camelCased and turn into disableProgressGraph

const camelCasedData = camelCaseObject(data);

And then we will be able to use it in ProgressTab

LGTM!

@navinkarkera
Copy link
Contributor

@brian-smith-tcril I have merged openedx/edx-platform#33308, this PR can be merged now.

@brian-smith-tcril brian-smith-tcril merged commit 391ea08 into openedx:master Oct 11, 2023
5 checks passed
@openedx-webhooks
Copy link

@RafayGhafoor 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.

@RafayGhafoor RafayGhafoor deleted the progress-graph branch October 11, 2023 17:48
@itsjeyd itsjeyd removed the needs test run Author's first PR to this repository, awaiting test authorization from Axim label Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-source-contribution PR author is not from Axim or 2U
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Can't hide progress graph from Studio
7 participants